<!--# layout("/common/mallout.html",{"jsBase":"/js/order/goDown/"}){ -->
<link rel="stylesheet" href="http://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop/mall/style/index.css">
<link rel="stylesheet" href="https://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop%2Fmall%2Fstyle%2Fbase.css">
<link rel="stylesheet" href="http://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop/mall/style/order.css">

<div class="section">
<input type="hidden" id="orderId" name="orderId" value="${orderId}"> 
	<div class="payment_box">
    	<div class="payment-section-title">支付订单</div>
        <div class="payment-method-con">
        	<ul class="order-info-fl">
                <li>
                	<p style="text-align:center;"><i class="icon"></i></p>
                    <p>订单提交成功，请等待审核！</p>
                </li>
                <li>
                    <label>订单号：</label>
                    <span>${orderId}
                        
                    </span>
                </li>
                <li>
                    <label>下单时间：</label>
                    <span id="createTime"></span>
                </li>
                <li>
                    <label>订单金额：</label>
                    <span id="orderMoney"></span>
                </li>
                                            <li>
                    <label>应付金额：</label>
                    <span><em class="price"><strong id="payMoney"></strong></em>元</span>
                </li>
            </ul>
        </div>
    </div>
    <!-------------------------------->
    <div class="payment_present"> 
    	<a href="/order/orderInfo/lookOrders.do" >查看订单</a> 
    	<a href="/index.do" >继续购物</a>
    </div>
    <!--------------------------------->
</div>


<!--#} -->
<script>
layui.use(['goDownSucess'], function(){
    var orderGoDownSucess = layui.goDownSucess;
    orderGoDownSucess.init();
});
var orderId=$("#orderId").val();
doAjax('/order/popGoDown/getPayOrderInfo.json', 'post', {'orderId':orderId}, function (data) {
	var payOrderResultDto= data.data;
	var costFreight;//运费
	var pmtRandom;//随机立减金额
	var totalAmount="";
	if(payOrderResultDto.costFreight){
		 costFreight=payOrderResultDto.costFreight;
	}else{
		 costFreight=0;
	}
	if(payOrderResultDto.pmtRandom){
		pmtRandom=payOrderResultDto.pmtRandom;
	}else{
		pmtRandom=0;
	}
	var orderMoney=payOrderResultDto.payableAmount+"元";
	if(costFreight!=0||pmtRandom!=0){
		totalAmount+="("
			if(costFreight!=0){
				totalAmount+="含运费:"+costFreight+"元";
			}
			if(pmtRandom!=0){
				totalAmount+="随机立减金额:"+pmtRandom+"元";
			}
		totalAmount+=")"
	}
	$("#createTime").html(payOrderResultDto.createtime);
	$("#orderMoney").html(orderMoney+totalAmount);
	$("#payMoney").html(payOrderResultDto.surplusPayed);
})


</script>

